home *** CD-ROM | disk | FTP | other *** search
- #include <intuition/intuition.h>
- #include <libraries/pm.h>
- #include <proto/pm.h>
-
- #include "menu.h"
-
- extern struct PopupMenuBase *PopupMenuBase;
-
- ULONG OpenMenu(struct Window * win, UWORD code) {
- struct PopupMenu *p;
- ULONG result ;
- /* initalize the menu
- */
- p=PMMenu("Clock Designer"),
- PMItem("Remove this point"),
- PM_UserData, ID_MDELETE,
- PMEnd,
- PMItem("Make this point be active"),
- PM_UserData, ID_MBECURRENT,
- PMEnd,
- PMItem("Quit"),
- PM_UserData, ID_MQUIT,
- PMEnd,
- End;
-
- if (p) {
- /* open the menu
- */
- result = PM_OpenPopupMenu(win, PM_Menu, p,
- PM_Code, code, TAG_DONE) ;
- PM_FreePopupMenu(p) ;
- }else
- printf("Can't create the popup menu.\n") ;
- return(result) ;
- }
-